<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CSS3 3D立方体Loading加载动画特效DEMO演示</title>

<style>
body {
	background-color: #ffffff;
	color: #6c6c6c;
	font-size: 12px;
}

.base {
	height: 9em;
	left: 50%;
	margin: -7.5em;
	padding: 3em;
	position: absolute;
	top: 50%;
	width: 9em;
	transform: rotateX(45deg) rotateZ(45deg);
	transform-style: preserve-3d;
}

.cube,
.cube:after,
.cube:before {
	content: '';
	float: left;
	height: 3em;
	position: absolute;
	width: 3em;
}

/* Top */
.cube {
	background-color: #05afd1;
	position: relative;
	transform: translateZ(3em);
	transform-style: preserve-3d;
	transition: .25s;
	box-shadow: 13em 13em 1.5em rgba(0, 0, 0, 0.1);
	animation: anim 1s infinite;
}
.cube:after {
	background-color: #049dbc;
	transform: rotateX(-90deg) translateY(3em);
	transform-origin: 100% 100%;
}
.cube:before {
	background-color: #048ca7;
	transform: rotateY(90deg) translateX(3em);
	transform-origin: 100% 0;
}
.cube:nth-child(1) {animation-delay: 0.05s;}
.cube:nth-child(2) {animation-delay: 0.1s;}
.cube:nth-child(3) {animation-delay: 0.15s;}
.cube:nth-child(4) {animation-delay: 0.2s;}
.cube:nth-child(5) {animation-delay: 0.25s;}
.cube:nth-child(6) {
animation-delay: 0.3s;}
.cube:nth-child(7) {animation-delay: 0.35s;
}
.cube:nth-child(8) {animation-delay: 0.4s;}
.cube:nth-child(9) {animation-delay: 0.45s;}

@keyframes anim {
	50% {
		transform: translateZ(0.5em);
	}
}



/* ANIMATIONS 进度条动画 */
@keyframes width {
	0%, 100% {
		transition-timing-function: cubic-bezier(1, 0, 0.65, 0.85);
	}
	0% {
		width: 0;
	}
	100% {
		width: 100%;
	}
}


.container {
	left: 50%;
	position: absolute;
	top: 100px;
	transform: translate(-50%, -50%);
	-webkit-transform: translate(-50%, -50%);
}

/* PROGRESS */
.progress {
	background-color: #e5e9eb;
	height: 0.25em;
	position: relative;
	width: 24em;
}
.progress-bar {
	animation-duration: 3s;
	animation-name: width;
	background-image: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);
	background-image: -webkit-linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);
	background-size: 24em 0.25em;
	height: 100%;
	position: relative;
}
.progress-shadow {
	background-image: linear-gradient(to bottom, #eaecee, transparent);
	background-image: -webkit-linear-gradient(to bottom, #eaecee, transparent);
	height: 4em;
	position: absolute;
	top: 100%;
	transform: skew(45deg);
	transform-origin: 0 0;
	width: 100%;
}
</style>

<script src="js/prefixfree.min.js"></script>

</head>

<body>

	<!--加载进度条位置-->
	<div class="container">
		<div class="progress">
			<div class="progress-bar">
				<div class="progress-shadow"></div>
			</div>
		</div>
	</div>


	<!--加载魔方位置-->
	<div class='base'>
		<div class='cube'></div>
		<div class='cube'></div>
		<div class='cube'></div>
		<div class='cube'></div>
		<div class='cube'></div>
		<div class='cube'></div>
		<div class='cube'></div>
		<div class='cube'></div>
		<div class='cube'></div>
	</div>

</body>
</html>